home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / delayed.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  984 b   |  34 lines  |  [TEXT/ttxt]

  1. #
  2. # test of DELAYED insert and timestamps
  3. # (Can't be tested with purify :( )
  4. #
  5.  
  6. create table t1 (a char(10), tmsp timestamp);
  7. insert into t1 set a = 1;
  8. insert delayed into t1 set a = 2;
  9. insert into t1 set a = 3, tmsp=NULL;
  10. insert delayed into t1 set a = 4;
  11. insert delayed into t1 set a = 5, tmsp = 19711006010203;
  12. insert delayed into t1 (a, tmsp) values (6, 19711006010203);
  13. insert delayed into t1 (a, tmsp) values (7, NULL);
  14. --sleep 1
  15. insert into t1 set a = 8,tmsp=19711006010203;
  16. select * from t1 where tmsp=0;
  17. select * from t1 where tmsp=19711006010203;
  18. drop table t1;
  19.  
  20. #
  21. # Test bug when inserting NULL into an auto_increment field with
  22. # INSERT DELAYED
  23. #
  24.  
  25. create table t1 (a int not null auto_increment primary key, b char(10));
  26. insert delayed into t1 values (1,"b");
  27. insert delayed into t1 values (null,"c");
  28. insert delayed into t1 values (3,"d"),(null,"e");
  29. --error 1136
  30. insert delayed into t1 values (3,"this will give an","error");
  31. --sleep 2
  32. select * from t1;
  33. drop table t1;
  34.